<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%@ page import = "java.io.*" %>
<%@ page import = "java.net.*" %>
<%@ page import = "java.text.*" %>
<%@ page import = "java.util.*" %>
<%@ page import = "java.sql.ResultSet" %>
<%@ page import="com.mbbcpa.util.*" %>
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>

<%@ include file="top.jsp" %>
<%
ResultSet exceptionrecord = (ResultSet)session.getAttribute("exceptionrecord");
String tempReportDateFr	= "";
String tempReportDateTo	= "";
%>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Exception Details Page.</title>
</head>
<script language="JavaScript" src="resource/calendar2.js"></script>

<script language="JavaScript1.2">
function getDetails()
{   if( document.selectAccountForm.input1.value===""||document.selectAccountForm.input1.value===null){
	alert("Select start date.")
    }
	else if ( document.selectAccountForm.input2.value==""||document.selectAccountForm.input2.value===null){
	alert("Select end date.")
	}
	else if( document.selectAccountForm.input1.value!=null&& document.selectAccountForm.input2.value!=null){
	var stmtdtselFR = document.selectAccountForm.input1.value;
	var stmtdtselTO = document.selectAccountForm.input2.value;
	document.selectAccountForm.rptdatefr.value	= stmtdtselFR;
	document.selectAccountForm.rptdateto.value	= stmtdtselTO;
	document.selectAccountForm.action='<%=response.encodeURL("ExceptionDetails.do?dispatch=execute")%>';
	document.selectAccountForm.submit();
	}
	}
</script>
<body>
<BR>
<%java.text.DateFormat df = new java.text.SimpleDateFormat("MM/dd/yyyy");%>
<form name="selectAccountForm" action="" method="post">
<input type="hidden" name="rptdatefr" value="">
<input type="hidden" name="rptdateto" value="">
		<table align="center" border=1 width = 100% height=60>
            <tr>
				<th class="header mbb_grey" colspan="2" align="center"><font color=#111111 size=5>Exception Error Details</font></th>
			</tr>
            <tr>
				<th class="header mbb_blue" colspan="2" align="center">View exception errors.</th>
			</tr>
		</table>
<BR>
<BR>
<tr class="header">
		<td nowrap='nowrap' width="10%" class='left'>Select exception errors date:</td>
		<td nowrap='nowrap' class='left'>
			FROM : <input type="Text" name="input1" value=<%= df.format(new java.util.Date()) %><%=tempReportDateFr%>>
			<a href="javascript:cal1.popup();"><img src="resource/cal.gif" width="16" height="16" border="0" alt="Click Here to Pick up the date"></a>
			TO BEFORE : <input type="Text" name="input2" value=<%= df.format(new java.util.Date()) %><%=tempReportDateTo%>>
			<a href="javascript:cal2.popup();"><img src="resource/cal.gif" width="16" height="16" border="0" alt="Click Here to Pick up the date"></a>
		</td>
	</tr>
</form>
<!--location.href=''-->
<BR><BR>
<a href="#" onClick="getDetails()"><u>[Get the Exception Error details]</u></a> 

<% if (exceptionrecord!=null){
out.print("<table align=\"left\" border=1 width = 100% >");
while (exceptionrecord.next()){
	out.print("<tr>");
	out.print("<td>");
	out.println(exceptionrecord.getString("EXCEPTION_DATE"));
	out.print("</td>");
	out.print("<td>");
	out.println(exceptionrecord.getString("MANUFACTURER"));
	out.print("</td>");
	out.print("<td>");
	out.println(exceptionrecord.getString("REMARK"));
	out.print("</td>");
	out.print("<td>");
	out.println(exceptionrecord.getString("DATA"));
	out.print("</td>");
	out.print("</tr>");
	
}
out.print("</table>");}
//out.print("<a href=\"#\" onClick=\"location.href=\' <%= response.encodeURL(\"ExceptionDetails.do?dispatch=execute" +"\""+"\" ><u>[Clear the Exception Error.]</u></a>");
%>
<script language="JavaScript">
	<!-- // create calendar object(s) just after form tag closed
		 // specify form element as the only parameter (document.forms['formname'].elements['inputname']);
		 // note: you can have as many calendar objects as you need for your application
	var cal1 = new calendar2(document.selectAccountForm.input1);
	cal1.year_scroll = true;
	cal1.time_comp = false;

	var cal2 = new calendar2(document.selectAccountForm.input2);
	cal2.year_scroll = false;
	cal2.time_comp = false;
	//-->
</script>
</body>
<%@ include file="bottom.jsp" %>

